search.parse();

var instance = {
	form : new Form("form"),
	loadData : function (data) {
		pcGlobal.sendRequest(__ctx + "/funcmgr/getFunctionsDetailDataByFuncid.xhtml", {entityid : data.entityid}, function(data, status) {
			if (data.status) {
				data.result.functype = instance.funcType(data.result.functype);
				if (data.result.rightsupport != null) {
					data.result.rightsupport = data.result.rightsupport == 1 ? "是" : "否";
				}
				instance.form.setData(data.result);
			}else search.error({content: data.result});
		});
	}, 
	funcType : function (val) {
		var itype= sysGlobal.FuncType;
		var text = "";
		for (var i = 0 ; i < itype.length; i++) {
			if(val == itype[i].value) text = itype[i].text;
		}
		return text;
	}
};